$(document).ready(function(){					
	var canvas = document.getElementById('canvas');//画布
	var stage = new JTopo.Stage(canvas);//舞台
	var scene = new JTopo.Scene(stage);//场景
	//显示工具栏 showJTopoToobar(stage);
	scene.background = './img/bg.jpg';//场景背景图片
	stage.add(scene);
	
	var node = new JTopo.PieChartNode("1");
    //node.shadow = true; //阴影设置, 默认为 false
    node.radius = 100;
    node.colors = ["#3666B0","#2CA8E0","#77D1F6"];  
    node.datas = [0.3, 0.3, 0.4];
    node.titles = ['A', 'B', 'C'];
    node.setLocation(350, 203);
    scene.add(node);
    
    //定时器动画效果
    function f(n){
        if(n > 20) return;
        node.datas[1] += 0.01;
        node.datas[2] -= 0.01;
        
        setTimeout(function(){
            f(n+1);
        }, 100);
    }
    f(0);
    
    
});
	